Runtime Optimization Of An Application Executing On A Parallel Computer

ABSTRACT

Identifying a collective operation within an application executing on a parallel computer; identifying a call site of the collective operation; determining whether the collective operation is root-based; if the collective operation is not root-based: establishing a tuning session and executing the collective operation in the tuning session; if the collective operation is root-based, determining whether all compute nodes executing the application identified the collective operation at the same call site; if all compute nodes identified the collective operation at the same call site, establishing a tuning session and executing the collective operation in the tuning session; and if all compute nodes executing the application did not identify the collective operation at the same call site, executing the collective operation without establishing a tuning session.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application of and claims priorityfrom U.S. patent application Ser. No. 12/760,111, filed on Apr. 14,2010.

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

This invention was made with Government support under Contract No.B554331 awarded by the Department of Energy. The Government has certainrights in this invention.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The field of the invention is data processing, or, more specifically,methods, apparatus, and products for runtime optimization of anapplication executing on a parallel computer.

2. Description Of Related Art

The development of the EDVAC computer system of 1948 is often cited asthe beginning of the computer era. Since that time, computer systemshave evolved into extremely complicated devices. Today's computers aremuch more sophisticated than early systems such as the EDVAC. Computersystems typically include a combination of hardware and softwarecomponents, application programs, operating systems, processors, buses,memory, input/output devices, and so on. As advances in semiconductorprocessing and computer architecture push the performance of thecomputer higher and higher, more sophisticated computer software hasevolved to take advantage of the higher performance of the hardware,resulting in computer systems today that are much more powerful thanjust a few years ago.

Parallel computing is an area of computer technology that hasexperienced advances.

Parallel computing is the simultaneous execution of the same task (splitup and specially adapted) on multiple processors in order to obtainresults faster. Parallel computing is based on the fact that the processof solving a problem usually can be divided into smaller tasks, whichmay be carried out simultaneously with some coordination.

Parallel computers execute parallel algorithms. A parallel algorithm canbe split up to be executed a piece at a time on many differentprocessing devices, and then put back together again at the end to get adata processing result. Some algorithms are easy to divide up intopieces. Splitting up the job of checking all of the numbers from one toa hundred thousand to see which are primes could be done, for example,by assigning a subset of the numbers to each available processor, andthen putting the list of positive results back together. In thisspecification, the multiple processing devices that execute theindividual pieces of a parallel program are referred to as ‘computenodes.’ A parallel computer is composed of compute nodes and otherprocessing nodes as well, including, for example, input/output (‘I/O’)nodes, and service nodes.

Parallel algorithms are valuable because it is faster to perform somekinds of large computing tasks via a parallel algorithm than it is via aserial (non-parallel) algorithm, because of the way modern processorswork. It is far more difficult to construct a computer with a singlefast processor than one with many slow processors with the samethroughput. There are also certain theoretical limits to the potentialspeed of serial processors. On the other hand, every parallel algorithmhas a serial part and so parallel algorithms have a saturation point.After that point adding more processors does not yield any morethroughput but only increases the overhead and cost.

Parallel algorithms are designed also to optimize one more resource thedata communications requirements among the nodes of a parallel computer.There are two ways parallel processors communicate, shared memory ormessage passing. Shared memory processing needs additional locking forthe data and imposes the overhead of additional processor and bus cyclesand also serializes some portion of the algorithm.

Message passing processing uses high-speed data communications networksand message buffers, but this communication adds transfer overhead onthe data communications networks as well as additional memory need formessage buffers and latency in the data communications among nodes.Designs of parallel computers use specially designed data communicationslinks so that the communication overhead will be small but it is theparallel algorithm that decides the volume of the traffic.

Many data communications network architectures are used for messagepassing among nodes in parallel computers. Compute nodes may beorganized in a network as a ‘torus’ or ‘mesh,’ for example. Also,compute nodes may be organized in a network as a tree. A torus networkconnects the nodes in a three-dimensional mesh with wrap around links.Every node is connected to its six neighbors through this torus network,and each node is addressed by its x,y,z coordinate in the mesh. In sucha manner, a torus network lends itself to point to point operations. Ina tree network, the nodes typically are connected into a binary tree:each node has a parent, and two children (although some nodes may onlyhave zero children or one child, depending on the hardwareconfiguration). Although a tree network typically is inefficient inpoint to point communication, a tree network does provide high bandwidthand low latency for certain collective operations, message passingoperations where all compute nodes participate simultaneously, such as,for example, an allgather operation. In computers that use a torus and atree network, the two networks typically are implemented independentlyof one another, with separate routing circuits, separate physical links,and separate message buffers.

Collective operations that involve data communications amongst manycompute nodes may be carried out with a variety of algorithms. That is,the end result of a collective operation may be achieved in variousways. Some algorithms may provide better performance than otheralgorithms when operating in particular configurations. What is neededtherefore is a way to optimize the selection of the best performingalgorithm or set of algorithms to carry out collective operations inparticular operating configurations.

SUMMARY OF THE INVENTION

Methods, apparatus, and products for runtime optimization of anapplication executing on a parallel computer are disclosed. Inembodiments of the present invention, the parallel computer isconfigured with a number of compute nodes organized into a communicatorand runtime optimization includes: identifying, by each compute nodeduring application runtime, a collective operation within theapplication; identifying, by each compute node, a call site of thecollective operation in the application; and determining, by eachcompute node, whether the collective operation is root-based. If thecollective operation is not root-based the runtime optimizationaccording to embodiments of the present invention includes establishinga tuning session administered by a self tuning module for the collectiveoperation in dependence upon an identifier of the call site of thecollective operation and executing the collective operation in thetuning session. If the collective operation is root-based, the runtimeoptimization according to embodiments of the present invention includesdetermining whether all compute nodes executing the applicationidentified the collective operation at the same call site.

If all compute nodes executing the application identified the collectiveoperation at the same call site, the runtime optimization according toembodiments of the present invention includes establishing a tuningsession administered by the self tuning module for the collectiveoperation in dependence upon the identifier of the call site of thecollective operation and executing the collective operation in thetuning session. If all compute nodes executing the application did notidentify the collective operation at the same call site, the runtimeoptimization according to embodiments of the present invention includesexecuting the collective operation without establishing a tuningsession.

The foregoing and other objects, features and advantages of theinvention will be apparent from the following more particulardescriptions of exemplary embodiments of the invention as illustrated inthe accompanying drawings wherein like reference numbers generallyrepresent like parts of exemplary embodiments of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an exemplary system for runtime optimization of anapplication executing on a parallel computer according to embodiments ofthe present invention.

FIG. 2 sets forth a block diagram of an exemplary compute node useful ina parallel computer capable of runtime optimization of an applicationexecuting on the parallel computer according to embodiments of thepresent invention.

FIG. 3A illustrates an exemplary Point To Point Adapter useful insystems capable of runtime optimization of an application executing on aparallel computer according to embodiments of the present invention.

FIG. 3B illustrates an exemplary Global Combining Network Adapter usefulin systems capable of runtime optimization of an application executingon a parallel computer according to embodiments of the presentinvention.

FIG. 4 sets forth a line drawing illustrating an exemplary datacommunications network optimized for point to point operations useful insystems capable of runtime optimization of an application executing on aparallel computer in accordance with embodiments of the presentinvention.

FIG. 5 sets forth a line drawing illustrating an exemplary datacommunications network optimized for collective operations useful insystems capable of runtime optimization of an application executing on aparallel computer in accordance with embodiments of the presentinvention.

FIG. 6 sets forth a flow chart illustrating an exemplary method ofruntime optimization of an application executing on a parallel computeraccording to embodiments of the present invention.

FIG. 7 sets forth a flow chart illustrating a further exemplary methodof runtime optimization of an application executing on a parallelcomputer according to embodiments of the present invention.

FIG. 8 sets forth a flow chart illustrating a further exemplary methodof runtime optimization of an application executing on a parallelcomputer according to embodiments of the present invention.

FIG. 9 sets forth a flow chart illustrating a further exemplary methodof runtime optimization of an application executing on a parallelcomputer according to embodiments of the present invention.

FIG. 10 sets forth a flow chart illustrating a further exemplary methodof runtime optimization of an application executing on a parallelcomputer according to embodiments of the present invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Exemplary methods, apparatus, and products for runtime optimization ofan application executing on a parallel computer in accordance withembodiments of the present invention are described with reference to theaccompanying drawings, beginning with FIG. 1. FIG. 1 illustrates anexemplary system for runtime optimization of an application executing ona parallel computer according to embodiments of the present invention.The system of FIG. 1 includes a parallel computer (100), non-volatilememory for the computer in the form of data storage device (118), anoutput device for the computer in the form of printer (120), and aninput/output device for the computer in the form of computer terminal(122). Parallel computer (100) in the example of FIG. 1 includes aplurality of compute nodes (102).

The compute nodes (102) are coupled for data communications by severalindependent data communications networks including a Joint Test ActionGroup (‘JTAG’) network (104), a global combining network (106) which isoptimized for collective operations, and a torus network (108) which isoptimized point to point operations. The global combining network (106)is a data communications network that includes data communications linksconnected to the compute nodes so as to organize the compute nodes as atree. Each data communications network is implemented with datacommunications links among the compute nodes (102). The datacommunications links provide data communications for parallel operationsamong the compute nodes of the parallel computer. The links betweencompute nodes are bi-directional links that are typically implementedusing two separate directional data communications paths.

In addition, the compute nodes (102) of parallel computer are organizedinto at least one operational group (132) of compute nodes forcollective parallel operations on parallel computer (100). Anoperational group of compute nodes is the set of compute nodes uponwhich a collective parallel operation executes. Collective operationsare implemented with data communications among the compute nodes of anoperational group. Collective operations are those functions thatinvolve all the compute nodes of an operational group. A collectiveoperation is an operation, a message-passing computer programinstruction that is executed simultaneously, that is, at approximatelythe same time, by all the compute nodes in an operational group ofcompute nodes. Such an operational group may include all the computenodes in a parallel computer (100) or a subset all the compute nodes.Collective operations are often built around point to point operations.A collective operation requires that all processes on all compute nodeswithin an operational group call the same collective operation withmatching arguments. A ‘broadcast’ is an example of a collectiveoperation for moving data among compute nodes of an operational group. A‘reduce’ operation is an example of a collective operation that executesarithmetic or logical functions on data distributed among the computenodes of an operational group. An operational group may be implementedas, for example, an MPI ‘communicator.’

‘MPI’ refers to ‘Message Passing Interface,’ a prior art parallelcommunications library, a module of computer program instructions fordata communications on parallel computers. Examples of prior-artparallel communications libraries that may be improved for use withsystems according to embodiments of the present invention include MPIand the ‘Parallel Virtual Machine’ (‘PVM’) library. PVM was developed bythe University of Tennessee, The Oak Ridge National Laboratory, andEmory University. MPI is promulgated by the MPI Forum, an open groupwith representatives from many organizations that define and maintainthe MPI standard. MPI at the time of this writing is a de facto standardfor communication among compute nodes running a parallel program on adistributed memory parallel computer. This specification sometimes usesMPI terminology for ease of explanation, although the use of MPI as suchis not a requirement or limitation of the present invention.

Some collective operations have a single originating or receivingprocess running on a particular compute node in an operational group.For example, in a ‘broadcast’ collective operation, the process on thecompute node that distributes the data to all the other compute nodes isan originating process. In a ‘gather’ operation, for example, theprocess on the compute node that received all the data from the othercompute nodes is a receiving process. The compute node on which such anoriginating or receiving process runs is referred to as a logical root.

Most collective operations are variations or combinations of four basicoperations: broadcast, gather, scatter, and reduce. The interfaces forthese collective operations are defined in the MPI standards promulgatedby the MPI Forum. Algorithms for executing collective operations,however, are not defined in the MPI standards. In a broadcast operation,all processes specify the same root process, whose buffer contents willbe sent. Processes other than the root specify receive buffers. Afterthe operation, all buffers contain the message from the root process.

In a scatter operation, the logical root divides data on the root intosegments and distributes a different segment to each compute node in theoperational group. In scatter operation, all processes typically specifythe same receive count. The send arguments are only significant to theroot process, whose buffer actually contains sendcount * N elements of agiven data type, where N is the number of processes in the given groupof compute nodes. The send buffer is divided and dispersed to allprocesses (including the process on the logical root). Each compute nodeis assigned a sequential identifier termed a ‘rank.’ After theoperation, the root has sent sendcount data elements to each process inincreasing rank order. Rank 0 receives the first sendcount data elementsfrom the send buffer. Rank 1 receives the second sendcount data elementsfrom the send buffer, and so on.

A gather operation is a many-to-one collective operation that is acomplete reverse of the description of the scatter operation. That is, agather is a many-to-one collective operation in which elements of adatatype are gathered from the ranked compute nodes into a receivebuffer in a root node.

A reduce operation is also a many-to-one collective operation thatincludes an arithmetic or logical function performed on two dataelements. All processes specify the same ‘count’ and the same arithmeticor logical function. After the reduction, all processes have sent countdata elements from computer node send buffers to the root process. In areduction operation, data elements from corresponding send bufferlocations are combined pair-wise by arithmetic or logical operations toyield a single corresponding element in the root process's receivebuffer. Application specific reduction operations can be defined atruntime. Parallel communications libraries may support predefinedoperations. MPI, for example, provides the following pre-definedreduction operations:

-   -   MPI_MAX maximum    -   MPI_MIN minimum    -   MPI_SUM sum    -   MPI_PROD product    -   MPI_LAND logical and    -   MPI_BAND bitwise and    -   MPI_LOR logical or    -   MPI_BOR bitwise or    -   MPI_LXOR logical exclusive or    -   MPI_BXOR bitwise exclusive or

In addition to compute nodes, the parallel computer (100) includesinput/output (‘I/O’) nodes (110, 114) coupled to compute nodes (102)through the global combining network (106). The compute nodes in theparallel computer (100) are partitioned into processing sets such thateach compute node in a processing set is connected for datacommunications to the same I/O node. Each processing set, therefore, iscomposed of one I/O node and a subset of compute nodes (102). The ratiobetween the number of compute nodes to the number of I/O nodes in theentire system typically depends on the hardware configuration for theparallel computer.

For example, in some configurations, each processing set may be composedof eight compute nodes and one I/O node. In some other configurations,each processing set may be composed of sixty-four compute nodes and oneI/O node. Such example are for explanation only, however, and not forlimitation. Each I/O nodes provide I/O services between compute nodes(102) of its processing set and a set of I/O devices. In the example ofFIG. 1, the I/O nodes (110, 114) are connected for data communicationsI/O devices (118, 120, 122) through local area network (‘LAN’) (130)implemented using high-speed Ethernet.

The parallel computer (100) of FIG. 1 also includes a service node (116)coupled to the compute nodes through one of the networks (104). Servicenode (116) provides services common to pluralities of compute nodes,administering the configuration of compute nodes, loading programs intothe compute nodes, starting program execution on the compute nodes,retrieving results of program operations on the computer nodes, and soon. Service node (116) runs a service application (124) and communicateswith users (128) through a service application interface (126) that runson computer terminal (122).

As described in more detail below in this specification, the system ofFIG. 1 operates generally for runtime optimization of an applicationexecuting on a parallel computer according to embodiments of the presentinvention. In the example system of FIG. 1, a number of the computenodes (102) are organized into a communicator. A communicator is acollection of one or more processes executing on compute nodes of aparallel computer. In some embodiments of the present invention eachcompute node executes a single process and as such a communicator isoftentimes referred to as a collection of one or more compute nodes.Readers of skill in the art will recognize, however, that a compute nodemay execute more than one process concurrently and each process may beorganized into a separate communicator. In such embodiments, a computenode may be considered a part of multiple communicators rather than justone. Communicators connect groups of processes in a communicationssession, such as an MPI session. Within a communicator each containedprocess has an independent identifier and the contained processes may bearranged in an ordered topology. Communicators enable processes within agroup to communicate amongst one another, via intracommunicatoroperations, and groups of processes to communicate amongst one anothervia, intercommunicator communications.

The system of FIG. 1 operates for runtime optimization of theapplication (208) executing on the parallel computer (100) byidentifying, by each compute node (102) during application runtime, acollective operation (210) within the application. Application runtimeas the term is used here refers to a time after the source code of theapplication is compiled, linked, and loaded. That is, when theapplication is ‘running’ or executing.

The system of FIG. 1 continues runtime optimization according toembodiments of the present invention by identifying, by each computenode (102), a call site of the collective operation in the application.A call site of a collective operation is a location of the function callof the collective operation in the application.

The system of FIG. 1 continues runtime optimization according toembodiments of the present invention by determining, by each computenode, whether the collective operation is root-based. A root-basedcollective operation is a collective operation having as a parameter ofcollective operation function the rank of the root node. Examples ofroot-based collective operations include a broadcast operation, ascatter operation, a gather operation, or a reduce operation. The rootcompute node of a root-based collective operation may have a differentcall site than all other compute nodes for the same operation. If thecollective operation is not root-based, the system of FIG. 1 continuesruntime optimization in accordance with embodiments of the presentinvention by establishing a tuning session administered by a self tuningmodule (212) for the collective operation in dependence upon anidentifier of the call site of the collective operation and executingthe collective operation in the tuning session. If the collectiveoperation is root-based, the system of FIG. 1 continues runtimeoptimization according to embodiments of the present invention bydetermining, through use of a single other collective operation, whetherall compute nodes executing the application identified the collectiveoperation at the same call site. If all compute nodes executing theapplication identified the collective operation at the same call site,the system of FIG. 1 establishes a tuning session administered by theself tuning module (212) for the collective operation in dependence uponthe identifier of the call site of the collective operation and executesthe collective operation in the tuning session. If all compute nodesexecuting the application did not identify the collective operation atthe same call site, the system of FIG. 1 executes the collectiveoperation without establishing a tuning session.

In a tuning session a self tuning module iteratively, for a number ofdifferent algorithm, selects one or more algorithms to carry out acollective operation and records performance metrics of the operation ofthe executed collective operation. One example of a prior art selftuning module that may modified for runtime optimization in accordancewith embodiments of present invention is the Self Tuned AdaptiveRoutines (STAR') for MPI. STAR is a library of routines that, whenlinked with an MPI application, is capable of identifying an optimizedcommunication algorithm for collective operation running within anapplication on a particular operating platform. The STAR librarytypically includes two components: a repository of algorithms and anautomatic algorithm selection mechanism that is configured to select analgorithm for a collective operation of an application and/or platformthat meets predefined criteria. When an MPI application invokes, atruntime, a collective operation iteratively many times, the STAR routinethat realizes that operation utilizes a different algorithm or set ofalgorithms from the repository component of the STAR library to completeeach iterative invocation of the collective operation. Each subsequentinvocation of the collective operation causes the STAR routine toexamine a different algorithm to carry out the collective operations,dynamically at runtime. Once all algorithms have been examined, the STARautomatic selection mechanism selects an algorithm or set of algorithmsfor which the performance of the execution of the collective operationmet predefined performance criteria. One primary advantage to STAR isthat STAR collects performance measurements of an execution of acollective operation implemented with a particular algorithm or set ofalgorithms, in the context of an application platform, enabling anincreased accuracy and precision of measured performance.

Prior art implementations of STAR, however, provide several drawbacks.The output of STAR after collecting performance measurements andselecting algorithms, is a log file that a user must manually process tomake use of. In addition, root-based MPI operations, such as a‘broadcast’ or ‘allreduce’ operation, may hinder STAR because the rootof the collective may have a call site different from other nodes forthe same root-based collective. That is, call sites among the computenodes may be different for the same root-based collective operation.

STAR also requires users or application developers to modify theapplication source code, including adding an extra parameter, a callsite identifier, to an MPI collective operation being invoked. BecauseMPI collective routines may be invoked in several call sites within anapplication because STAR differentiates amongst call sites, the callerof a collective operation for which STAR is to tune must inform STAR ofthe current call site. Prior art implementations of STAR achieve this bymodifying the application source code to include a unique identifier foreach call site. Such modification may be inefficient and require agreater amount of computing overhead than necessary. Further, prior artimplementation of STAR tune all collective operations at all messagesizes and for all communicators, rather than providing tuning for asubset of collective operations.

The arrangement of nodes, networks, and I/O devices making up theexemplary system illustrated in FIG. 1 are for explanation only, not forlimitation of the present invention. Data processing systems capable ofruntime optimization of an application executing on a parallel computeraccording to embodiments of the present invention may include additionalnodes, networks, devices, and architectures, not shown in FIG. 1, aswill occur to those of skill in the art. Although the parallel computer(100) in the example of FIG. 1 includes sixteen compute nodes (102),readers will note that parallel computers configured according toembodiments of the present invention may include any number of computenodes. In addition to Ethernet and JTAG, networks in such dataprocessing systems may support many data communications protocolsincluding for example TCP (Transmission Control Protocol), IP (InternetProtocol), and others as will occur to those of skill in the art.Various embodiments of the present invention may be implemented on avariety of hardware platforms in addition to those illustrated in FIG.1.

Runtime optimization of an application executing on a parallel computeraccording to embodiments of the present invention may be generallyimplemented on a parallel computer that includes a plurality of computenodes. In fact, such computers may include thousands of such computenodes. Each compute node is in turn itself a kind of computer composedof one or more computer processors (or processing cores), its owncomputer memory, and its own input/output adapters. For furtherexplanation, therefore, FIG. 2 sets forth a block diagram of anexemplary compute node useful in a parallel computer capable of runtimeoptimization of an application executing on the parallel computeraccording to embodiments of the present invention. The compute node(152) of FIG. 2 includes one or more processing cores (164) as well asrandom access memory (RAM') (156). The processing cores (164) areconnected to RAM (156) through a high-speed memory bus (154) and througha bus adapter (194) and an extension bus (168) to other components ofthe compute node (152). Stored in RAM (156) is an application program(208), a module of computer program instructions that carries outparallel, user-level data processing using parallel algorithms.

Also stored in RAM (156) is a messaging module (160), a library ofcomputer program instructions that carry out parallel communicationsamong compute nodes, including point to point operations as well ascollective operations. Application program (158) executes collectiveoperations by calling software routines in the messaging module (160). Alibrary of parallel communications routines may be developed fromscratch for use in systems according to embodiments of the presentinvention, using a traditional programming language such as the Cprogramming language, and using traditional programming methods to writeparallel communications routines that send and receive data among nodeson two independent data communications networks. Alternatively, existingprior art libraries may be improved to operate according to embodimentsof the present invention. Examples of prior-art parallel communicationslibraries include the ‘Message Passing Interface’ (‘MPI’) library andthe ‘Parallel Virtual Machine’ (‘PVM’) library.

Also stored in RAM (156) is a self tuning module (212), a module ofcomputer program instructions that carries out runtime optimization ofthe application (208) on the parallel computer of which the compute node(152) is a part. The self tuning module (212) prior to runtime is linkedwith the application (208) in such a way that the application, whenexecuting, calls collective operations through a call to a libraryfunction provided by the self tuning module (212) rather than a typicalcall to the messaging module (160). At runtime of the application (208),therefore, when the application (208) identifies a collective operation(210), that ‘encounters’ a collective operation, within the application,the compute node (152), through the self tuning module (212), identifiesa call site (214) of the collective operation (210) in the application(208).

The example compute node (152) of FIG. 2, through the self tuning module(212) also determines whether the collective operation (210) isroot-based. If the collective operation is not root-based, the selftuning module (212) establishes a tuning session (216) administered bythe self tuning module (212) for the collective operation (210) independence upon an identifier of the call site, a call site ID (214), ofthe collective operation and executes the collective operation (210) inthe tuning session (216). Executing a collective operation (210) in atuning session is carried out by executing the collective operationiteratively with a number of different algorithms or sets of algorithmsand collective performance metrics of each iterative execution.

If the collective operation is root-based, the example compute node(152) of FIG. 2 determines, through use of a single other collectiveoperation—a collective operation other than the collective operation(210) identified in the application (208)—whether all compute nodesexecuting the application identified the collective operation at thesame call site. If all compute nodes executing the applicationidentified the collective operation at the same call site, the selftuning module may establish a tuning session administered by the selftuning module for the collective operation in dependence upon theidentifier of the call site of the collective operation and execute thecollective operation in the tuning session. If all compute nodesexecuting the application did not identify the collective operation atthe same call site, the compute node (152) may execute the collectiveoperation without establishing a tuning session.

During finalization of the application (208), the self tuning module(212) may select, for a particular collective operation of theapplication, such as collective operation (210), in dependence upon oneor more tuning sessions (216) for the particular collective operation,one or more algorithms to carry out the particular collective operationupon subsequent executions of the application (208). The one or morealgorithms selected to carry out the particular collective operationrepresent an optimized set of algorithms (including one or morealgorithms) to carry out the particular collective operation. The selftuning module (212) may record the one or more selected algorithms. Inthe example compute node (152) of FIG. 2, the self tuning module (212)records selected algorithms in a data structure globally available toall compute nodes (152) in the communicator, in an optimized collectiveoperation library (218). The library is linked with the application(208) upon executions subsequent to initial self tuning and provides theapplication with functions that return the selected algorithms for aparticular collective operation (210) in the application (208) wheninvoked or called by the application. That is, during a subsequentexecution of the application (208) and without performing another tuningsession, the application (208), through utilization of the optimizedcollective operation library, may carry out the particular collectiveoperation (210) of the application (208) with the recorded selectedalgorithms that represent optimized algorithms.

Also stored in RAM (156) is an operating system (162), a module ofcomputer program instructions and routines for an application program'saccess to other resources of the compute node. It is typical for anapplication program and parallel communications library in a computenode of a parallel computer to run a single thread of execution with nouser login and no security issues because the thread is entitled tocomplete access to all resources of the node. The quantity andcomplexity of tasks to be performed by an operating system on a computenode in a parallel computer therefore are smaller and less complex thanthose of an operating system on a serial computer with many threadsrunning simultaneously. In addition, there is no video I/O on thecompute node (152) of FIG. 2, another factor that decreases the demandson the operating system. The operating system may therefore be quitelightweight by comparison with operating systems of general purposecomputers, a pared down version as it were, or an operating systemdeveloped specifically for operations on a particular parallel computer.Operating systems that may usefully be improved, simplified, for use ina compute node include UNIX™, Linux™, Microsoft XP™, AIX™, IBM's i5/OS™,and others as will occur to those of skill in the art.

The exemplary compute node (152) of FIG. 2 includes severalcommunications adapters (172, 176, 180, 188) for implementing datacommunications with other nodes of a parallel computer. Such datacommunications may be carried out serially through RS-232 connections,through external buses such as Universal Serial Bus (‘USB’), throughdata communications networks such as IP networks, and in other ways aswill occur to those of skill in the art. Communications adaptersimplement the hardware level of data communications through which onecomputer sends data communications to another computer, directly orthrough a network. Examples of communications adapters useful in systemsthat provide runtime optimization of an application executing on aparallel computer according to embodiments of the present inventioninclude modems for wired communications, Ethernet (IEEE 802.3) adaptersfor wired network communications, and 802.11b adapters for wirelessnetwork communications.

The data communications adapters in the example of FIG. 2 include aGigabit Ethernet adapter (172) that couples example compute node (152)for data communications to a Gigabit Ethernet (174). Gigabit Ethernet isa network transmission standard, defined in the IEEE 802.3 standard,that provides a data rate of 1 billion bits per second (one gigabit).Gigabit Ethernet is a variant of Ethernet that operates over multimodefiber optic cable, single mode fiber optic cable, or unshielded twistedpair.

The data communications adapters in the example of FIG. 2 include a JTAGSlave circuit (176) that couples example compute node (152) for datacommunications to a JTAG Master circuit (178). JTAG is the usual nameused for the IEEE 1149.1 standard entitled Standard Test Access Port andBoundary-Scan Architecture for test access ports used for testingprinted circuit boards using boundary scan. JTAG is so widely adaptedthat, at this time, boundary scan is more or less synonymous with JTAG.JTAG is used not only for printed circuit boards, but also forconducting boundary scans of integrated circuits, and is also useful asa mechanism for debugging embedded systems, providing a convenient “backdoor” into the system. The example compute node of FIG. 2 may be allthree of these: It typically includes one or more integrated circuitsinstalled on a printed circuit board and may be implemented as anembedded system having its own processor, its own memory, and its ownI/O capability. JTAG boundary scans through JTAG Slave (176) mayefficiently configure processor registers and memory in compute node(152) for use in runtime optimization of an application executing on aparallel computer according to embodiments of the present invention.

The data communications adapters in the example of FIG. 2 includes aPoint To Point Adapter (180) that couples example compute node (152) fordata communications to a network (108) that is optimal for point topoint message passing operations such as, for example, a networkconfigured as a three-dimensional torus or mesh. Point To Point Adapter(180) provides data communications in six directions on threecommunications axes, x, y, and z, through six bidirectional links: +x(181), −x (182), +y (183), −y (184), +z (185), and −z (186).

The data communications adapters in the example of FIG. 2 includes aGlobal Combining Network Adapter (188) that couples example compute node(152) for data communications to a network (106) that is optimal forcollective message passing operations on a global combining networkconfigured, for example, as a binary tree. The Global Combining NetworkAdapter (188) provides data communications through three bidirectionallinks: two to children nodes (190) and one to a parent node (192).

Example compute node (152) includes two arithmetic logic units (‘ALUs’).ALU (166) is a component of each processing core (164), and a separateALU (170) is dedicated to the exclusive use of Global Combining NetworkAdapter (188) for use in performing the arithmetic and logical functionsof reduction operations. Computer program instructions of a reductionroutine in parallel communications library (160) may latch aninstruction for an arithmetic or logical function into instructionregister (169). When the arithmetic or logical function of a reductionoperation is a ‘sum’ or a ‘logical or,’ for example, Global CombiningNetwork Adapter (188) may execute the arithmetic or logical operation byuse of ALU (166) in processor (164) or, typically much faster, by usededicated ALU (170).

The example compute node (152) of FIG. 2 includes a direct memory access(‘DMA’) controller (195), which is computer hardware for direct memoryaccess and a DMA engine (197), which is computer software for directmemory access. The DMA engine (197) of FIG. 2 is typically stored incomputer memory of the DMA controller (195). Direct memory accessincludes reading and writing to memory of compute nodes with reducedoperational burden on the central processing units (164). A DMA transferessentially copies a block of memory from one location to another,typically from one compute node to another. While the CPU may initiatethe DMA transfer, the CPU does not execute it.

For further explanation, FIG. 3A illustrates an exemplary Point To PointAdapter (180) useful in systems capable of runtime optimization of anapplication executing on a parallel computer according to embodiments ofthe present invention. Point To Point Adapter (180) is designed for usein a data communications network optimized for point to pointoperations, a network that organizes compute nodes in athree-dimensional torus or mesh. Point To Point Adapter (180) in theexample of FIG. 3A provides data communication along an x-axis throughfour unidirectional data communications links, to and from the next nodein the −x direction (182) and to and from the next node in the +xdirection (181). Point To Point Adapter (180) also provides datacommunication along a y-axis through four unidirectional datacommunications links, to and from the next node in the −y direction(184) and to and from the next node in the +y direction (183). Point ToPoint Adapter (180) in FIG. 3A also provides data communication along az-axis through four unidirectional data communications links, to andfrom the next node in the −z direction (186) and to and from the nextnode in the +z direction (185).

For further explanation, FIG. 3B illustrates an exemplary GlobalCombining Network Adapter (188) useful in systems capable of runtimeoptimization of an application executing on a parallel computeraccording to embodiments of the present invention. Global CombiningNetwork Adapter (188) is designed for use in a network optimized forcollective operations, a network that organizes compute nodes of aparallel computer in a binary tree. Global Combining Network Adapter(188) in the example of FIG. 3B provides data communication to and fromtwo children nodes through four unidirectional data communications links(190). Global Combining Network Adapter (188) also provides datacommunication to and from a parent node through two unidirectional datacommunications links (192).

For further explanation, FIG. 4 sets forth a line drawing illustratingan exemplary data communications network (108) optimized for point topoint operations useful in systems capable of runtime optimization of anapplication executing on a parallel computer accordance with embodimentsof the present invention. In the example of FIG. 4, dots representcompute nodes (102) of a parallel computer, and the dotted lines betweenthe dots represent data communications links (103) between computenodes. The data communications links are implemented with point to pointdata communications adapters similar to the one illustrated for examplein FIG. 3A, with data communications links on three axes, x, y, and z,and to and fro in six directions +x (181), −x (182), +y (183), −y (184),+z (185), and −z (186). The links and compute nodes are organized bythis data communications network optimized for point to point operationsinto a three dimensional mesh (105). The mesh (105) has wrap-aroundlinks on each axis that connect the outermost compute nodes in the mesh(105) on opposite sides of the mesh (105). These wrap-around links formpart of a torus (107). Each compute node in the torus has a location inthe torus that is uniquely specified by a set of x, y, z coordinates.Readers will note that the wrap-around links in the y and z directionshave been omitted for clarity, but are configured in a similar manner tothe wrap-around link illustrated in the x direction. For clarity ofexplanation, the data communications network of FIG. 4 is illustratedwith only 27 compute nodes, but readers will recognize that a datacommunications network optimized for point to point operations for usein runtime optimization of an application executing on a parallelcomputer in accordance with embodiments of the present invention maycontain only a few compute nodes or may contain thousands of computenodes.

For further explanation, FIG. 5 sets forth a line drawing illustratingan exemplary data communications network (106) optimized for collectiveoperations useful in systems capable of runtime optimization of anapplication executing on a parallel computer in accordance withembodiments of the present invention. The example data communicationsnetwork of FIG. 5 includes data communications links connected to thecompute nodes so as to organize the compute nodes as a tree. In theexample of FIG. 5, dots represent compute nodes (102) of a parallelcomputer, and the dotted lines (103) between the dots represent datacommunications links between compute nodes. The data communicationslinks are implemented with global combining network adapters similar tothe one illustrated for example in FIG. 3B, with each node typicallyproviding data communications to and from two children nodes and datacommunications to and from a parent node, with some exceptions. Nodes ina binary tree (106) may be characterized as a physical root node (202),branch nodes (204), and leaf nodes (206). The root node (202) has twochildren but no parent. The leaf nodes (206) each has a parent, but leafnodes have no children. The branch nodes (204) each has both a parentand two children. The links and compute nodes are thereby organized bythis data communications network optimized for collective operationsinto a binary tree (106). For clarity of explanation, the datacommunications network of FIG. 5 is illustrated with only 31 computenodes, but readers will recognize that a data communications networkoptimized for collective operations for use in systems that provideruntime optimization of an application executing on a parallel computerin accordance with embodiments of the present invention may contain onlya few compute nodes or may contain thousands of compute nodes.

In the example of FIG. 5, each node in the tree is assigned a unitidentifier referred to as a ‘rank’ (250). A node's rank uniquelyidentifies the node's location in the tree network for use in both pointto point and collective operations in the tree network. The ranks inthis example are assigned as integers beginning with 0 assigned to theroot node (202), 1 assigned to the first node in the second layer of thetree, 2 assigned to the second node in the second layer of the tree, 3assigned to the first node in the third layer of the tree, 4 assigned tothe second node in the third layer of the tree, and so on. For ease ofillustration, only the ranks of the first three layers of the tree areshown here, but all compute nodes in the tree network are assigned aunique rank.

For further explanation, FIG. 6 sets forth a flow chart illustrating anexemplary method of runtime optimization of an application executing ona parallel computer according to embodiments of the present invention.In the method of FIG. 6, the parallel computer includes a plurality ofcompute nodes organized into a communicator. The method of FIG. 6includes identifying (602), by each compute node during applicationruntime, a collective operation (210) within the application. The methodof FIG. 6, also includes identifying (604), by each compute node, a callsite (214) of the collective operation in the application.

The method of FIG. 6 also includes determining (606), by each computenode, whether the collective operation is root-based. If the collectiveoperation is not root-based, the method of FIG. 6 continues byestablishing (608) a tuning session (216) administered by a self tuningmodule for the collective operation in dependence upon an identifier ofthe call site of the collective operation and executing (610) thecollective operation in the tuning session. Executing (610) thecollective operation in the tuning session (216) may include storingperformance metrics (612) in the tuning session (216).

If the collective operation is root-based, the method of FIG. 6continues by determining (614), through use of a single other collectiveoperation, whether all compute nodes executing the applicationidentified the collective operation at the same call site (214). If allcompute nodes executing the application identified the collectiveoperation at the same call site, the method of FIG. 6 continues byestablishing (608) a tuning session (216) administered by the selftuning module for the collective operation in dependence upon theidentifier of the call site of the collective operation and executing(610) the collective operation in the tuning session. If all computenodes executing the application did not identify the collectiveoperation at the same call site, the method of FIG. 6 continues byexecuting (616) the collective operation without establishing a tuningsession (216).

For further explanation, FIG. 7 sets forth a flow chart illustrating afurther exemplary method of runtime optimization of an applicationexecuting on a parallel computer according to embodiments of the presentinvention. The method of FIG. 7 is similar to the method of FIG. 6 inthat the method of FIG. 7 is carried out by compute nodes of a parallelcomputer and the compute nodes are organized into a communicator. Themethod of FIG. 7 is also similar to the method of FIG. 6 in that themethod of FIG. 7 includes identifying (602) a collective operation(210); identifying (604) a call site of the collective operation in theapplication; determining (606) whether the collective operation isroot-based; if the collective operation is not root-based: establishing(608) a tuning session (216) and executing (610) the collectiveoperation (210) in the tuning session; if the collective operation isroot-based, determining (614) whether all compute nodes identified thesame call site; if all compute nodes identified the same call site,establishing (608) a tuning session and executing (610) the collectiveoperation in the tuning session; and if all compute nodes did notidentify the same call site, executing (616) the collective operationwithout establishing a tuning session.

The method of FIG. 7 differs from the method of FIG. 6, however, in thatin the method of FIG. 7, identifying (602) a collective operation withinthe application includes identifying (706) a collective operation totune in dependence upon a hint comprising an attribute of a functioncall that passes through the communicator to the self tuning module toindicate whether to tune the collective operation. In MPI, eachcollective operation includes a communicator parameter. In accordancewith some embodiments of the present invention, this communicatorparameter may be modified to include a hint attribute, one or more bitsfor example, that indicate whether to tune a particular collectiveoperation. Such hints enable an application developer to selectivelyindicate those collective operation the developer intends to tune andthose the developer intends to not tune.

In the method of FIG. 7, identifying (604) a call site of the collectiveoperation in the application is carried out by calling (702) a tracebackfunction and receiving (704) as a return from the traceback function aunique memory address for the collective operation. The applicationexecuting on each compute node, being linked with self tuning moduleprior to execution, may encounter a collective operation and execute thecollective operation with a call to the self tuning module rather than astandard messaging module. The self tuning module, upon receipt of sucha call, initially determines the call site by calling the tracebackfunction. The traceback function returns an array of pointer addressesthat represents a sequence of calls or invocations of functions. Eachpointer address is unique to a particular call site and may be composedin various ways, including for example, as a composition of a caller'sname or identification and an offset from a point “0” to the point inthe code at which the function is called. The self tuning module mayidentify by the call site of the collective operation by determining theaddress in the pointer array returned from the traceback functioncorresponding to the call executed previous to the traceback function.

For further explanation, FIG. 8 sets forth a flow chart illustrating afurther exemplary method of runtime optimization of an applicationexecuting on a parallel computer according to embodiments of the presentinvention. The method of FIG. 8 is similar to the method of FIG. 6 inthat the method of FIG. 8 is carried out by compute nodes of a parallelcomputer and the compute nodes are organized into a communicator. Themethod of FIG. 8 is also similar to the method of FIG. 6 in that themethod of FIG. 8 includes identifying (602) a collective operation(210); identifying (604) a call site of the collective operation in theapplication; determining (606) whether the collective operation isroot-based; if the collective operation is not root-based: establishing(608) a tuning session (216) and executing (610) the collectiveoperation (210) in the tuning session; if the collective operation isroot-based, determining (614) whether all compute nodes identified thesame call site; if all compute nodes identified the same call site,establishing (608) a tuning session and executing (610) the collectiveoperation in the tuning session; and if all compute nodes did notidentify the same call site, executing (616) the collective operationwithout establishing a tuning session.

The method of FIG. 8 differs from the method of FIG. 6, however, in thatdetermining (614) whether all compute nodes executing the applicationidentified the collective operation at the same call site is carried outby performing (802) on all the compute nodes of the communicator an‘allreduce’ collective operation to identify the minimum and maximumvalues of all of the identified call sites. If the minimum and maximumvalues are the same, all compute nodes identified the same call site. Toreduce the overhead of determining whether all nodes identified the samecall site, a single allreduce operation is carried out, rather than two.The following pseudocode is an example of determining, by a computenode, whether all nodes identified the same call site:

int Bcast( ) {    int tmp[2], result[2];    tmp[0] = call_site_id;   tmp[1] = {tilde over ( )}call_site_id;    MPI_Allreduce(tmp, result,2, MPI_UNSIGNED_LONG,    MPI_MAX, comm);    if (result[0] != ({tildeover ( )}result[1]))     same_call_site = 0; }

In the psuedocode example above, the compute node declares two arrayseach having two elements: ‘tmp’ and ‘result.’ In the first element of‘tmp,’ the compute node stores the present value of the call siteidentifier of the collective operation. In the second element ‘tmp,’ thecompute node stores the negative of the call site identifier. Theallreduce function includes as parameters, the source or send buffer,‘tmp,’ the number of elements of the send buffer, two, the data type ofelements, and the communicator identifier. The allreduce operation whenexecuted finds the maximum value of the positive call site identifieramong all compute nodes in the communicator and the maximum value of thenegative call site identifier among all compute nodes in thecommunicator. The maximum of the negative call site identifiers amongall compute nodes is the negative of the minimum call side identifieramong all compute nodes. The results of the allreduce, the maximum ofthe positive call site IDs and the maximum of the negative call siteIDs, is stored in the compute node's receive buffer—the ‘result’ array.The compute node then determines if the maximum call site identifieramong all compute nodes (the first element of the ‘result’ array) is notequal to the negative maximum of the negative call site identifiers (thesecond element in the ‘result’ array and the minimum call siteidentifier). If the two are not equal, then at least one compute nodeidentified the collective operation at a different call site. Readers ofskill in the art will recognize, that although the above pseudocodeexample utilizes the MPI_Max operation, the MPI_Min operation, findingthe minimum rather than the maximum, may be utilized to achieve the sameresults.

For further explanation, FIG. 9 sets forth a flow chart illustrating afurther exemplary method of runtime optimization of an applicationexecuting on a parallel computer according to embodiments of the presentinvention. The method of FIG. 9 is similar to the method of FIG. 6 inthat the method of FIG. 9 is carried out by compute nodes of a parallelcomputer and the compute nodes are organized into a communicator. Themethod of FIG. 9 is also similar to the method of FIG. 6 in that themethod of FIG. 9 includes identifying (602) a collective operation(210); identifying (604) a call site of the collective operation in theapplication; determining (606) whether the collective operation isroot-based; if the collective operation is not root-based: establishing(608) a tuning session (216) and executing (610) the collectiveoperation (210) in the tuning session; if the collective operation isroot-based, determining (614) whether all compute nodes identified thesame call site; if all compute nodes identified the same call site,establishing (608) a tuning session and executing (610) the collectiveoperation in the tuning session; and if all compute nodes did notidentify the same call site, executing (616) the collective operationwithout establishing a tuning session.

The method of FIG. 9 differs from the method of FIG. 10 in that themethod of FIG. 9 includes selecting (902), for a particular collectiveoperation of the application in dependence upon one or more tuningsessions for the particular collective operation, one or more algorithmsto carry out the particular collective operation upon subsequentexecutions of the application. In the method of FIG. 9, the one or morealgorithms represent an optimized set of algorithms to carry out theparticular collective operation. The method of FIG. 10 also includesrecording (904) the one or more selected algorithms. During a subsequentexecution of the application and without performing another tuningsession, the method of FIG. 10 includes carrying (902) out theparticular collective operation of the application with the recordedselected algorithms. In this way, the application may be optimized afteronly a single execution.

Further explanation of the recording (904) and carrying out (902) of theapplication of FIG. 9, FIG. 10 sets forth a flow chart illustrating afurther exemplary method of runtime optimization of an applicationexecuting on a parallel computer according to embodiments of the presentinvention. Recording (904) the one or more selected algorithms for thetuning session may be carried out when the finalization of applicationruntime, such as, for example, in response to an MPI finalize functioncall.

In the method of FIG. 10, recording (904) the one or more selectedalgorithms from the tuning session is carried out by recording (1002),in association with the one or more selected algorithms, an identifierof the call site (214) for the particular collective operation, amessage size, and a communicator identifier. The associated data may bestored as a global data structure in a custom library that may bequeried upon subsequent executions of the application. On a subsequentexecution of the application, the custom library may be compiled andlinked with the application, such that when a collective operation isinvoked, a signature for the collective operation (the associated datamentioned above) is created dynamically during rutime and passed as anattribute to a ‘find_best_algorithm( )’ function. The‘find_best_function’ algorithm may search the global data structure fora matching signature and returns the previously selected, optimizedalgorithms which are then invoked to carry out the collective operation.

Also in the method of FIG. 10, recording (1002) the one or more selectedalgorithms from the tuning session includes identifying (1002) any ofthe tuned collective operations that are non-critical collectiveoperations and carrying (1004) out the particular collective operationincludes carrying out the non-critical collective operations withstandard messaging module algorithms. Non-critical collective operationsmay be of two types: operations with a low number of invocations and lowweight (total execution time), or operations for which the selectedalgorithms match standard messaging module algorithms.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described above with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

It will be understood from the foregoing description that modificationsand changes may be made in various embodiments of the present inventionwithout departing from its true spirit. The descriptions in thisspecification are for purposes of illustration only and are not to beconstrued in a limiting sense. The scope of the present invention islimited only by the language of the following claims.

1. A method of runtime optimization of an application executing on aparallel computer, the parallel computer having a plurality of computenodes organized into a communicator, the method comprising: determining,by each compute node, whether a collective operation is root-based; ifthe collective operation is not root-based, establishing a tuningsession administered by a self tuning module for the collectiveoperation in dependence upon an identifier of a call site of thecollective operation and executing the collective operation in thetuning session; if the collective operation is root-based, determining,through use of a single other collective operation, whether all computenodes executing the application identified the collective operation atthe same call site; if all compute nodes executing the applicationidentified the collective operation at the same call site, establishinga tuning session administered by the self tuning module for thecollective operation in dependence upon the identifier of the call siteof the collective operation and executing the collective operation inthe tuning session; and if all compute nodes executing the applicationdid not identify the collective operation at the same call site,executing the collective operation without establishing a tuningsession.
 2. The method of claim 1 wherein a root-based collectiveoperation comprises one of: a broadcast operation, a scatter operation,a gather operation, or a reduce operation.
 3. (canceled)
 4. (canceled)5. The method of claim 1 wherein determining whether all compute nodesexecuting the application identified the collective operation at thesame call site further comprising performing on all the compute nodes ofthe communicator a single ‘allreduce’ collective operation to identifythe minimum and maximum values of all of the identified call sites. 6.The method of claim 1 further comprising: selecting, for a particularcollective operation of the application in dependence upon one or moretuning sessions for the particular collective operation, one or morealgorithms to carry out the particular collective operation uponsubsequent executions of the application, the one or more algorithmsrepresenting an optimized set of algorithms to carry out the particularcollective operation; recording the one or more selected algorithms; andduring a subsequent execution of the application and without performinganother tuning session, carrying out the particular collective operationof the application with the recorded selected algorithms.
 7. The methodof claim 6 wherein recording the one or more selected algorithms fromthe tuning session further comprises recording, in association with theone or more selected algorithms, an identifier of the call site for theparticular collective operation, a message size, and a communicatoridentifier.
 8. The method of claim 6 wherein: recording the one or moreselected algorithms from the tuning session further comprisesidentifying any of the tuned collective operations that are non-criticalcollective operations; and carrying out the particular collectiveoperation of the application with the recorded selected algorithmsfurther comprises carrying out the non-critical collective operationswith standard messaging module algorithms.
 9. An apparatus for runtimeoptimization of an application executing on a parallel computer, theparallel computer having a plurality of compute nodes organized into acommunicator, the apparatus comprising a computer processor and acomputer memory operatively coupled to the computer processor, thecomputer memory having disposed within it computer program instructionsthat when executed by the computer processor cause the apparatus tocarry out the steps of: determining, by each compute node, whether acollective operation is root-based; if the collective operation is notroot-based, establishing a tuning session administered by a self tuningmodule for the collective operation in dependence upon an identifier ofa call site of the collective operation and executing the collectiveoperation in the tuning session; if the collective operation isroot-based, determining, through use of a single other collectiveoperation, whether all compute nodes executing the applicationidentified the collective operation at the same call site; if allcompute nodes executing the application identified the collectiveoperation at the same call site, establishing a tuning sessionadministered by the self tuning module for the collective operation independence upon the identifier of the call site of the collectiveoperation and executing the collective operation in the tuning session;and if all compute nodes executing the application did not identify thecollective operation at the same call site, executing the collectiveoperation without establishing a tuning session.
 10. The apparatus ofclaim 9 wherein a root-based collective operation comprises one of: abroadcast operation, a scatter operation, a gather operation, or areduce operation.
 11. (canceled)
 12. (canceled)
 13. The apparatus ofclaim 9 wherein determining whether all compute nodes executing theapplication identified the collective operation at the same call sitefurther comprising performing on all the compute nodes of thecommunicator an ‘allreduce’ collective operation to identify the minimumand maximum values of all of the identified call sites.
 14. Theapparatus of claim 9 further comprising computer program instructionsthat when executed by the computer processor cause the apparatus tocarry out the steps of: selecting, for a particular collective operationof the application in dependence upon one or more tuning sessions forthe particular collective operation, one or more algorithms to carry outthe particular collective operation, the one or more algorithmsrepresenting an optimized set of algorithms to carry out the particularcollective operation; recording the one or more selected algorithms; andduring a subsequent execution of the application and without performinganother tuning session, carrying out the particular collective operationof the application with the recorded selected algorithms.
 15. Theapparatus of claim 14 wherein recording the one or more selectedalgorithms from the tuning session further comprises recording, inassociation with the one or more selected algorithms, an identifier ofthe call site for the particular collective operation, a message size,and a communicator identifier.
 16. The apparatus of claim 14 wherein:recording the one or more selected algorithms from the tuning sessionfurther comprises identifying any of the tuned collective operationsthat are non-critical collective operations; and carrying out theparticular collective operation of the application with the recordedselected algorithms further comprises carrying out the non-criticalcollective operations with standard messaging module algorithms.
 17. Acomputer program product for runtime optimization of an applicationexecuting on a parallel computer, the parallel computer having aplurality of compute nodes organized into a communicator, the computerprogram product disposed in a computer readable storage medium, thecomputer program product comprising computer program instructions thatwhen executed by a processor cause a computer to carry out the steps of:determining, by each compute node, whether a collective operation isroot-based; if the collective operation is not root-based, establishinga tuning session administered by a self tuning module for the collectiveoperation in dependence upon an identifier of a call site of thecollective operation and executing the collective operation in thetuning session; if the collective operation is root-based, determining,through use of a single other collective operation, whether all computenodes executing the application identified the collective operation atthe same call site; if all compute nodes executing the applicationidentified the collective operation at the same call site, establishinga tuning session administered by the self tuning module for thecollective operation in dependence upon the identifier of the call siteof the collective operation and executing the collective operation inthe tuning session; and if all compute nodes executing the applicationdid not identify the collective operation at the same call site,executing the collective operation without establishing a tuningsession.
 18. The computer program product of claim 17 wherein aroot-based collective operation comprises one of: a broadcast operation,a scatter operation, a gather operation, or a reduce operation. 19.(canceled)
 20. (canceled)
 21. The computer program product of claim 17wherein determining whether all compute nodes executing the applicationidentified the collective operation at the same call site furthercomprising performing on all the compute nodes of the communicator an‘allreduce’ collective operation to identify the minimum and maximumvalues of all of the identified call sites.
 22. The computer programproduct of claim 17 further comprising computer program instructionsthat when executed by a processor cause a computer to carry out thesteps of: selecting, for a particular collective operation of theapplication in dependence upon one or more tuning sessions for theparticular collective operation, one or more algorithms to carry out theparticular collective operation, the one or more algorithms representingan optimized set of algorithms to carry out the particular collectiveoperation; recording the one or more selected algorithms; and during asubsequent execution of the application and without performing anothertuning session, carrying out the particular collective operation of theapplication with the recorded selected algorithms.
 23. The computerprogram product of claim 22 wherein recording the one or more selectedalgorithms from the tuning session further comprises recording, inassociation with the one or more selected algorithms, an identifier ofthe call site for the particular collective operation, a message size,and a communicator identifier.
 24. The computer program product of claim22 wherein: recording the one or more selected algorithms from thetuning session further comprises identifying any of the tuned collectiveoperations that are non-critical collective operations; and carrying outthe particular collective operation of the application with the recordedselected algorithms further comprises carrying out the non-criticalcollective operations with standard messaging module algorithms.